package com.ls.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ls.domain.Score;
import com.ls.domain.vo.ReportScore;
import com.ls.mapper.ScoreMapper;
import com.ls.service.ScoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(rollbackFor = RuntimeException.class)
public class ScoreServiceImpl extends ServiceImpl<ScoreMapper, Score> implements ScoreService {

    @Autowired
    private ScoreMapper scoreMapper;

    @Override
    public List<ReportScore> selectScoreTch(String teacherClass, int startIndex, int pageSize) {
        return scoreMapper.selectScoreTch(teacherClass,startIndex,pageSize);
    }

    @Override
    public int selectScoreTchCount(String teacherClass) {
        return scoreMapper.selectScoreTchCount(teacherClass);
    }

    @Override
    public List<ReportScore> searchScoreTch(String teacherClass, String reportName, String sno, String studentName, int startIndex, int pageSize) {
        return scoreMapper.searchScoreTch(teacherClass,reportName,sno,studentName,startIndex,pageSize);
    }

    @Override
    public int searchScoreTchCount(String teacherClass, String reportName, String sno, String studentName) {
        return scoreMapper.searchScoreTchCount(teacherClass,reportName,sno,studentName);
    }

    @Override
    public List<ReportScore> selectScoreAdm(int startIndex, int pageSize) {
        return scoreMapper.selectScoreAdm(startIndex,pageSize);
    }

    @Override
    public int selectScoreAdmCount() {
        return scoreMapper.selectScoreAdmCount();
    }

    @Override
    public List<ReportScore> searchScoreAdm(String studentClass, String reportName, String sno, String studentName, int startIndex, int pageSize) {
        return scoreMapper.searchScoreAdm(studentClass,reportName,sno,studentName,startIndex,pageSize);
    }

    @Override
    public int searchScoreAdmCount(String studentClass, String reportName, String sno, String studentName) {
        return scoreMapper.searchScoreAdmCount(studentClass,reportName,sno,studentName);
    }

    @Override
    public List<ReportScore> selectScoreStu(Integer sid, int startIndex, int pageSize) {
        return scoreMapper.selectScoreStu(sid,startIndex,pageSize);
    }

    @Override
    public int selectScoreStuCount(Integer sid) {
        return scoreMapper.selectScoreStuCount(sid);
    }

    @Override
    public List<ReportScore> searchScoreStu(Integer sid, String reportName, int startIndex, int pageSize) {
        return scoreMapper.searchScoreStu(sid,reportName,startIndex,pageSize);
    }

    @Override
    public int searchScoreStuCount(Integer sid, String reportName) {
        return scoreMapper.searchScoreStuCount(sid,reportName);
    }

    @Override
    public List<String> analyseScoreTch(String teacherClass) {
        return scoreMapper.analyseScoreTch(teacherClass);
    }

    @Override
    public List<ReportScore> inputScoreTch(String teacherClass) {
        return scoreMapper.inputScoreTch(teacherClass);
    }

    @Override
    public List<ReportScore> inputScoreAdm() {
        return scoreMapper.inputScoreAdm();
    }

    @Override
    public ReportScore reportInput(Integer sid, Integer rid) {
        return scoreMapper.reportInput(sid, rid);
    }
}
